<?php


namespace Wbk\Asset\Util;


use Exception;

class ConfigUtil
{
    /**
     * @throws Exception
     */
    public static function getConfigFile($fileName)
    {
        if (function_exists('root_path')){
            $path = root_path().'config';
        }else{
            $path = __DIR__.'/../../../../../config';
        }

        if (is_file($path . '/asset_center.php')){
            return require $path . '/asset_center.php';
        }
        if(!$path){
            $path = __DIR__.'/../../config';
        }
        return require $path . '/'. $fileName;
    }
}